#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct _test {
    long a;
    double b;
} test;

void main(void) {
    void * a = NULL;
    test x = {
        .a = -1000,
        .b = 100.9999,
    };
    /**
     *test.c: In function ‘main’:
     *test.c:16:16: error: incompatible types when initializing type ‘test *’ {aka ‘struct _test *’} using type ‘test’ {aka ‘struct _test’}
     *   16 |     test * b = x;
     *      |
     */
    test * b = x;// 出现类型错误就会自动爆出错误的类型，可以借此判断变量的类型
    test * b = &x;
    printf("b.a is %ld\n", b->a);
    printf("b.b is %f\n", (*b).b);
}

